widgetpath: correctly print the siblings index
authorCosimo Cecchi <cosimoc@gnome.org>
Wed, 23 Nov 2011 16:22:30 +0000 (11:22 -0500)
committerCosimo Cecchi <cosimoc@gnome.org>
Wed, 23 Nov 2011 16:22:30 +0000 (11:22 -0500)
In gtk_widget_path_to_string() we were counting siblings from zero
instead of one, resulting in confusing output.

gtk/gtkwidgetpath.c

index a694f7b07db7cde723399a6f93a00000ee30c899..5720b384441fe6301e88f24e480cffc73253dca5 100644 (file)
@@ -331,7 +331,7 @@ gtk_widget_path_to_string (const GtkWidgetPath *path)
 
       if (elem->siblings)
         g_string_append_printf (string, "[%d/%d]",
-                                elem->sibling_index,
+                                elem->sibling_index + 1,
                                 gtk_widget_path_length (elem->siblings));
 
       if (elem->classes)